package com.yj.spring.charpter03;

import com.yj.spring.common.ArgumentValue;
import com.yj.spring.common.PropertyValue;
import lombok.Data;

import java.util.List;

@Data
public class BeanDefinition {
    private String SCOPE_SINGLETON = "singleton";
    private String SCOPE_PROTOTYPE = "prototype";

    // 是否懒加载
    private boolean isLazyInit = false;

    // 是否依赖其他Bean
    private String[] dependsOn;

    // 初始化方法
    private String initMethod;
    // 销毁方法
    private String destroyMethod;

    // 作用域
    private String scope = SCOPE_SINGLETON;

    // Bean的Class
    private Object beanClass;

    // setter注入
    private List<PropertyValue> propertyValues;

    // 构造函数注入
    private List<ArgumentValue> argumentValues;

    private String id;

    private String className;

    public BeanDefinition(String id, String className) {
        this.id = id;
        this.className = className;
    }
}


